﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

using Com.Framework.Data;
using Com.Web.coffinegurunaru.AppLogic.Page;
using Com.Library.DB.Popup;
using Com.Library.Page;

namespace Com.Web.coffinegurunaru.manager.banner
{
	public partial class popupMethod : ManagerAjaxPage
	{
		public void Create(int Width, int Height, int Left, int Top, byte PopupType, string ImageURL, string LinkURL, string HTML, byte IsCookie)
		{
			string ManagerName = this.WebCookies.ManagerName;
			PopupModel.Create(Width, Height, Left, Top, PopupType, ImageURL, LinkURL, HTML, IsCookie, ManagerName);
		}

		public void Modify(int SeqNo, int Width, int Height, int Left, int Top, byte PopupType, string ImageURL, string LinkURL, string HTML, byte IsCookie)
		{
			string ManagerName = this.WebCookies.ManagerName;
			PopupModel.Modify(SeqNo, Width, Height, Left, Top, PopupType, ImageURL, LinkURL, HTML, IsCookie, ManagerName);
		}

		public void Remove(int SeqNo)
		{
			PopupModel.Remove(SeqNo);
		}

		public string GetList(int PageNo, byte PageSize)
		{
			ListData<PopupEntity, OutputEntity> PopupList = PopupModel.GetList(1, 100);
			Dictionary<string, object> properties = new Dictionary<string, object>();
			properties.Add("PopupList", PopupList.Record);
			string retValue = ViewManager<ManagerPage>.Render("/manager/banner/popupList.ascx", properties);

			return retValue;
		}
	}
}
